<template>
  <div class="registerDetail">
    <!-- 单车详情 -->
    <div class="detail_header flex">
      <div class="detail_header_lt">
        <div class="carNo flex">
          {{ dataSource.taskName }}<i class="iconfont icon-right"></i>
        </div>
        <div class="hank flex">
          <div class="name">{{ dataSource.customerName }}</div>
          <div class="carName">{{ dataSource.carModelName }}</div>
        </div>
      </div>
      <div class="detail_header_rt">
        <a class="flex" :href="`tel:${dataSource.ownerPhone}`">
          <i class="iconfont icon-tel"></i>
          <div class="txt">联系车主</div>
        </a>
      </div>
    </div>

    <!-- 底部tab -->
    <div class="tabBarBox">
      <van-tabs v-model="tabActive">
        <van-tab title="任务信息">
          <div class="tabCar">
            <div class="formData">
              <van-field
                readonly
                v-model="dataSource.twoBillStatus"
                name="任务状态"
                label="任务状态"
                input-align="right"
              />

              <van-field
                v-model="dataSource.taskTypeName"
                name="任务类型"
                label="任务类型"
                input-align="right"
              />

              <van-field
                v-model="dataSource.taskCreateTime"
                name="任务生成时间"
                label="任务生成时间"
                input-align="right"
              />

              <van-field
                v-model="dataSource.taskPerson"
                name="任务跟进人员"
                label="任务跟进人员"
                input-align="right"
              />

              <van-field
                v-model="dataSource.lastFollowInTime"
                name="最近跟进时间"
                label="最近跟进时间"
                input-align="right"
              />
              <van-field
                v-model="dataSource.followType"
                name="最近跟进方式"
                label="最近跟进方式"
                input-align="right"
                readonly
              >
              </van-field>
              <van-field
                v-model="dataSource.taskDes"
                name="任务描述"
                label="任务描述"
                type="textarea"
                input-align="left"
                readonly
              />
              <van-field
                v-model="dataSource.mileage"
                name="个性字段"
                label="个性字段"
                input-align="right"
                readonly
              />
            </div>
          </div>
          <div class="relationTitle">本车关联任务</div>
          <div class="orderList" v-if="recordList && recordList.length != 0">
            <div
              class="orderItem"
              v-for="(item, index) in recordList"
              :key="index"
            >
              <div class="orderItem_header">
                <div class="orderItem_lt" @click="goDetail(item)">
                  <div class="carNo">{{ item.name }}</div>
                  <div class="carStatus">
                    {{ getFieldName(statusList, "code", item.insure) }}
                  </div>
                </div>
                <div class="orderItem_rt">跟进人：{{ item.servieName }}</div>
              </div>
              <div class="orderItem_content" @click="goDetail(item)">
                <div class="orderItem_data">
                  <div class="order_label">客户名称</div>
                  <div class="txt">{{ item.userName }}</div>
                </div>
                <div class="orderItem_data">
                  <div class="order_label">服务顾问</div>
                  <div class="txt">{{ item.servieName }}</div>
                </div>
                <div class="orderItem_data">
                  <div class="order_label">车型</div>
                  <div class="txt">{{ item.carType }}</div>
                </div>
                <div class="orderItem_data">
                  <div class="order_label">公里数</div>
                  <div class="txt">{{ item.mileage }}km</div>
                </div>
                <div class="orderItem_data time">
                  <div class="order_label">最后进场时间</div>
                  <div class="txt">{{ item.time }}</div>
                </div>
              </div>
            </div>
          </div>
        </van-tab>
        <van-tab title="跟进信息">
          <div class="followInfo">
            <div
              class="followInfo_item flex"
              v-for="(item, index) in dataSource.followEntry"
              :key="index"
            >
              <div class="followInfo_lt">
                <div class="followInfo_time">{{ item.followDate }}</div>
                <i class="iconfont icon-circle"></i>
              </div>

              <div class="followInfo_rt">
                <div class="followInfo_num">{{ item.followNumber }}</div>
                <div class="followInfo_data">
                  跟进方式：{{ item.followType }}
                </div>
                <div class="followInfo_data">
                  跟进结果：{{ item.followResult }}
                </div>
                <div class="followInfo_data">到店时间：-</div>
                <div class="followInfo_data">
                  跟进备注：{{ item.followNote }}
                </div>
                <div class="followInfo_data">
                  下次跟进时间：{{ item.nextFollowDate }}
                </div>
                <div class="followInfo_data flex">
                  <div>跟进补充：</div>
                  <img
                    class="followInfo_img"
                    @click="previewImg()"
                    src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fcbu01.alicdn.com%2Fimg%2Fibank%2F2020%2F555%2F900%2F14381009555_1565283795.jpg&refer=http%3A%2F%2Fcbu01.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1693918952&t=87f1097ef82261cd8c0511a89a676704"
                  /><img
                    class="followInfo_img"
                    src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fcbu01.alicdn.com%2Fimg%2Fibank%2F2020%2F555%2F900%2F14381009555_1565283795.jpg&refer=http%3A%2F%2Fcbu01.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1693918952&t=87f1097ef82261cd8c0511a89a676704"
                  />
                </div>
              </div>
            </div>
          </div>
          <div class="addBtn">
            <div class="orderItem_filebox" @click="addFollow">
              <i class="iconfont icon-add"></i>
              添加跟进记录
            </div>
          </div>
        </van-tab>

        <van-tab title="客户信息">
          <div class="contactbox">
            <div class="contactItem flex">
              <div class="contact_lt">
                <div class="header flex">
                  <div class="txt">客户</div>
                  <div class="name">{{ dataSource.customerName }}</div>
                </div>
                <div class="tel">{{ dataSource.mobile }}</div>
              </div>
              <div class="contact_rt">
                <a :href="`tel:${dataSource.ownerPhone}`">
                  <i class="iconfont icon-tel"></i>
                </a>
                <i class="iconfont icon-wx"></i>
              </div>
            </div>
          </div>
        </van-tab>
        <van-tab title="车辆档案">
          <div class="tabCar">
            <div class="formData">
              <van-field
                readonly
                v-model="dataSource.repairId"
                name="所属维修中心"
                label="所属维修中心"
                input-align="right"
              />

              <van-field
                v-model="dataSource.userName"
                name="所属服务顾问"
                label="所属服务顾问"
                input-align="right"
              />

              <van-field
                v-model="dataSource.vin"
                name="车牌号"
                label="车牌号"
                input-align="right"
              />

              <van-field
                v-model="dataSource.brand"
                name="车架号"
                label="车架号"
                input-align="right"
              />

              <van-field
                v-model="dataSource.timer"
                name="车型"
                label="车型"
                input-align="right"
              />
              <van-field
                v-model="dataSource.mileage"
                name="上次进场时间"
                label="上次进场时间"
                input-align="right"
                readonly
              />
              <van-field
                v-model="dataSource.mileage"
                name="里程"
                label="里程"
                input-align="right"
                readonly
              >
                <template slot="button">km</template>
              </van-field>

              <van-field
                v-model="dataSource.mileage"
                name="标签"
                label="标签"
                input-align="right"
                readonly
              >
                <template slot="input">
                  <div
                    class="label_item"
                    v-for="(item, index) in dataSource.label"
                    :key="index"
                  >
                    {{ item }}
                  </div>
                </template>
              </van-field>
            </div>
          </div>
          <div class="relationTitle">车辆维修履历</div>
          <div class="repairData">
            <div
              class="repairItem"
              v-for="(item, index) in dataSource.repairList"
              :key="index"
            >
              <div class="item_title flex">
                <div class="txt">履历编号：{{ item.repairNo }}</div>
                <i class="iconfont icon-right"></i>
              </div>
              <div class="item_content">
                <div class="item_contentbox flex">
                  <div class="item_data flex">
                    <div class="item_data_label">工单类型：</div>
                    <div class="item_data_value">{{ item.name }}</div>
                  </div>
                  <div class="item_data flex">
                    <div class="item_data_label">服务顾问：</div>
                    <div class="item_data_value">{{ item.serviceName }}</div>
                  </div>
                </div>

                <div class="item_content_data">
                  <div class="item_data flex">
                    <div class="item_data_label">进场时间：</div>
                    <div class="item_data_value">{{ item.time }}</div>
                  </div>
                  <div class="item_data flex">
                    <div class="item_data_label">合计金额：</div>
                    <div class="item_data_value">{{ item.allPrice }}元</div>
                  </div>
                  <div class="item_data flex">
                    <div class="item_data_label">卡券抵用金额：</div>
                    <div class="item_data_value">{{ item.carPrice }}元</div>
                  </div>
                  <div class="item_data">
                    <div class="item_data_label item_data_width">
                      人工操作：
                    </div>
                    <div class="item_data_value txt">{{ item.remark }}</div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </van-tab>
        <van-tab title="预约记录">
          <div
            class="orderList"
            v-if="dataSource.repairList && dataSource.repairList.length != 0"
          >
            <div
              class="orderItem"
              v-for="(item, index) in dataSource.repairList"
              :key="index"
            >
              <div class="orderItem_header">
                <div class="orderItem_lt" @click="goDetail(item)">
                  <div class="carNo">{{ item.name }}</div>
                  <div class="carStatus">{{ item.status }}</div>
                </div>
                <div class="orderItem_rt">
                  <a :href="`tel:${item.tel}`">
                    <i class="iconfont icon-tel"></i>
                  </a>
                  <div class="iconfont icon-wx"></div>
                </div>
              </div>
              <div class="orderItem_content" @click="goDetail(item)">
                <div class="orderItem_data">
                  <div class="order_label">客户名称</div>
                  <div class="txt">{{ item.userName }}</div>
                </div>
                <div class="orderItem_data">
                  <div class="order_label">所属服务顾问</div>
                  <div class="txt">{{ item.servieName }}</div>
                </div>
                <div class="orderItem_data">
                  <div class="order_label">车型</div>
                  <div class="txt">{{ item.carType }}</div>
                </div>
                <div class="orderItem_data">
                  <div class="order_label">工单类型</div>
                  <div class="txt">{{ item.mileage }}</div>
                </div>
                <div class="orderItem_data time">
                  <div class="order_label">预约进场时间</div>
                  <div class="txt">{{ item.time }}</div>
                </div>
              </div>
            </div>
          </div>
          <van-empty class="noContent" description="暂无数据" v-else />
          <div class="addBtn">
            <div class="orderItem_filebox" @click="applyRepair">
              <i class="iconfont icon-add"></i>
              新增预约
            </div>
          </div>
        </van-tab>
        <van-tab title="卡券信息">
          <div class="cardList">
            <div
              class="cardItem"
              v-for="(item, index) in dataSource.cardList"
              :key="index"
            >
              <div class="box flex">
                <div class="cardItem_lt flex">
                  <div class="price_icon">¥</div>
                  <div class="price">
                    <div class="txt">{{ item.price }}</div>
                    <div class="name">{{ item.priceName }}</div>
                  </div>
                </div>
                <div class="cardItem_rt">
                  <div class="label_name flex">
                    <div class="label_txt">{{ item.type }}</div>
                    <div class="label_txt1">{{ item.name }}</div>
                  </div>
                  <div class="label_time">{{ item.time }}领用</div>
                  <div class="label_time">{{ item.time1 }}到期</div>
                </div>
              </div>
              <div class="cardNo">券号{{ item.cardNo }}</div>
            </div>
          </div>
        </van-tab>
      </van-tabs>
    </div>
  </div>
</template>

<script>
import {
  Search,
  Empty,
  Field,
  Form,
  Uploader,
  DatetimePicker,
  Tab,
  Tabs,
  ImagePreview,
} from "vant";
import taskApi from "@/api/taskApi";
import { getCookies } from "@/utils/util.js";

export default {
  name: "taskCenterDetail",
  components: {
    Search,
    Empty,
    Field,
    Form,
    Uploader,
    DatetimePicker,
    Tab,
    Tabs,
    ImagePreview,
  },
  data() {
    return {
      showTimerPicker: false,
      dataSource: {
        billId: "1", //单据id
        taskTypeName: "定期保养", //任务类型
        taskName: "闽D66666定期保养", //任务名称
        oneBillStatus: "未处理", //任务一级状态
        twoBillStatus: "未处理", //任务二级状态
        carModelName: "Ct5 2.0T", //车型
        customerName: "张三", //客户名称
        mobile: "187231231", //电话
        ownerName: "李四", //车主姓名
        ownerPhone: "187231231", //车主电话
        contractPeople: "王武", //送修人姓名
        contractPhone: "1988123123", //送修电话
        taskCreateTime: "2023-08-08", //任务生成时间
        carNo: "闽D66666", //车牌号
        carId: "", //车牌ID
        taskPerson: "张某", //任务跟进人
        lastFollowInTime: "2023-08-07", //最近跟进时间
        followType: "企业微信", //跟进方式
        taskDes: "任务描述任务描述任务描述", //任务描述
        followEntry: [
          {
            entryId: "1", //分录ID
            followDate: "08-09", //跟进日期
            followNumber: "2099233", //跟进编码
            nextFollowDate: "2023-07-07", //下次跟进日期
            followResult: "预约回店", //跟进结果
            followType: "手机", //跟进方式
            followSupple: "", //跟进补充
            failed: "", //战败原因
            followPerson: "张三", //跟进人
            followNote: "跟进备注", //跟进备注
          },
          {
            entryId: "1", //分录ID
            followDate: "08-09", //跟进日期
            followNumber: "2099233", //跟进编码
            nextFollowDate: "2023-07-07", //下次跟进日期
            followResult: "预约回店", //跟进结果
            followType: "手机", //跟进方式
            followSupple: "", //跟进补充
            failed: "", //战败原因
            followPerson: "张三", //跟进人
            followNote: "跟进备注", //跟进备注
          },
        ],

        timer: "2022-01-01 10:20:20",
        brand: "帕拉梅拉",
        repairId: "厦门保时捷",
        userName: "张某某",
        car: "",
        vin: "LAAHHHHASSSSSAa",
        carNo: "",
        tel: "",
        repair: "",
        mileage: "2200",
        label: ["活跃客户", "8年车", "男"],
        cardList: [
          {
            price: 100,
            priceName: "金额抵用券",
            name: "200元喷漆工时券",
            time: "2023.07.16",
            time1: "2023.07.16",
            cardNo: "100123123123123132",
            type: "保险",
          },
          {
            price: 100,
            priceName: "金额抵用券",
            name: "200元喷漆工时券",
            time: "2023.07.16",
            time1: "2023.07.16",
            cardNo: "100123123123123132",
            type: "保险",
          },
        ],
        repairList: [
          {
            repairNo: "SRGGGGGAAA-001",
            name: "一般工单",
            serviceName: "张某某",
            time: "2023-09-01 15:30",
            allPrice: 2020,
            carPrice: 1000,
            remark:
              "更换蓄电池；更换蓄电池；更换蓄电池；更换蓄电池；更换蓄电池；更换蓄电池；更换蓄电池；更换蓄电池",
            status: "已开工单",
          },
          {
            repairNo: "SRGGGGGAAA-001",
            name: "一般工单",
            serviceName: "张某某",
            time: "2023-09-01 15:30",
            allPrice: 2020,
            carPrice: 1000,
            remark:
              "更换蓄电池；更换蓄电池；更换蓄电池；更换蓄电池；更换蓄电池；更换蓄电池；更换蓄电池；更换蓄电池",
            status: "已开工单",
          },
        ],
      },
      uploader: [],
      columns: [],
      showSelectPicker: false,
      disabled: false,
      detailId: "",
      tabActive: 0,
      recordList: [
        {
          id: 1,
          name: "闽D66666定期保养招揽",
          status: 2,
          insure: 2,
          time: "2023-06-25 12:29:30",
          address: "福建省厦门市思明区",
          vin: "LKHHAHHHAHHHHAYYYYA",
          tel: "13333333333",
          userName: "张某某",
          servieName: "高某某",
          carType: " CT5 2,0T",
          mileage: "9999",
        },
        {
          id: 2,
          name: "闽D66666",
          status: 2,
          insure: 2,
          time: "2023-06-25 12:29:30",
          address: "福建省厦门市思明区",
          vin: "LKHHAHHHAHHHHAYYYYA",
          tel: "16666666666",
          userName: "张某某",
          servieName: "高某某",
          carType: " CT5 2,0T",
          mileage: "9999",
        },
      ],
      statusList: [
        { name: "已处理", code: 1, check: false },
        { name: "未处理", code: 2, check: false },
      ],
      userId: getCookies("userId"), //用户ID，必填，String
    };
  },

  mounted() {
    if (this.$route.query) {
      this.detailId = this.$route.query.billId;
      this.getDetail(this.detailId);
    }
  },
  methods: {
    getDetail(billId) {
      taskApi
        .getCustomerTaskById({ billId, userId: this.userId })
        .then((res) => {
          this.dataSource = res;
        });
    },

    // 选择下拉
    handleSelect(field) {
      if (this.disabled) {
        return;
      }
      this.showSelectPicker = true;
      if (field == "repair") {
        this.columns = [
          { name: "是", value: 1 },
          { name: "否", value: 2 },
        ];
      } else if (field == "outUser") {
        this.columns = [
          { name: "服务人员1", value: 1 },
          { name: "服务人员2", value: 2 },
        ];
      }
      this.field = field;
    },
    // 选择下拉确认
    handleSelectConfirm(value, index) {
      this.dataSource[this.field] = value.name;
      this.showSelectPicker = false;
    },
    getLocal() {
      console.log(1111);
    },

    onConfirm(val, field) {
      let year = val.getFullYear();
      let month = val.getMonth() + 1;
      let day = val.getDate();
      let hour = val.getHours();
      let minute = val.getMinutes();
      // let second = val.getSeconds()
      if (month >= 1 && month <= 9) {
        month = `0${month}`;
      }
      if (day >= 1 && day <= 9) {
        day = `0${day}`;
      }
      if (hour >= 0 && hour <= 9) {
        hour = `0${hour}`;
      }
      if (minute >= 0 && minute <= 9) {
        minute = `0${minute}`;
      }
      // if (second >= 0 && second <= 9) { second = `0${second}` }
      this.dataSource[field] = `${year}-${month}-${day} ${hour}:${minute}:00`;
      this.showTimerPicker = false;
    },

    formatter(type, value) {
      if (type === "year") {
        return `${value}年`;
      } else if (type === "month") {
        return `${value}月`;
      } else if (type === "day") {
        return `${value}日`;
      } else if (type === "hour") {
        return `${value}时`;
      } else if (type === "minute") {
        return `${value}分`;
      } else if (type === "second") {
        return `${value}秒`;
      }
      return value;
    },
    //维修预约
    applyRepair() {
      this.$router.push("/applyRepair");
    },
    // 获取list名称
    getFieldName(list, key, val) {
      if (list && list.length > 0) {
        let obj = list.filter((item) => {
          return item[key] == val;
        });
        if (obj.length > 0) {
          return obj[0].name;
        }
      }
      return null;
    },
    // 图片预览
    previewImg() {
      ImagePreview([
        "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fcbu01.alicdn.com%2Fimg%2Fibank%2F2020%2F555%2F900%2F14381009555_1565283795.jpg&refer=http%3A%2F%2Fcbu01.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1693918952&t=87f1097ef82261cd8c0511a89a676704",
      ]);
    },
    // 添加跟进记录
    addFollow() {
      this.$router.push({
        path: "/taskCenterEdit",
        query: { billId: this.detailId },
      });
    },
    formOnSubmit() {},
  },
};
</script>

<style lang="less" scoped>
body {
  background: #f3f3f3;
}
.flex {
  display: flex;
  align-items: center;
}
.registerDetail {
  .detail_header {
    justify-content: space-between;
    margin: 0.2rem 0.2rem;
    border-radius: 5px;
    background: #fff;
    padding: 0.3rem;
    .detail_header_lt {
      .carNo {
        font-size: 0.32rem;
        font-weight: bold;
        margin-bottom: 0.2rem;
        .icon-right {
          margin-left: 0.2rem;
          color: #409eff;
        }
      }
      .hank {
        font-size: 0.28rem;
        color: #666;
        .name {
          border-right: 2px solid #ccc;
          padding-right: 0.1rem;
          margin-right: 0.1rem;
        }
      }
    }
    .detail_header_rt {
      justify-content: flex-start;
      .txt {
        font-size: 0.28rem;
        color: #161616;
      }
      .icon-tel {
        color: #fff;
        background: #35bc04;
        font-size: 0.32rem;
        padding: 0.1rem;
        border-radius: 50%;
        margin-right: 0.1rem;
      }
    }
  }
  .formData {
    background: #fff;
  }
}

.label_item {
  color: #35bc04;
  border: 1px solid #35bc04;
  border-radius: 4px;
  margin-right: 0.1rem;
  padding: 0.01rem 0.2rem;
  font-size: 0.2rem;
  &:last-child {
    margin-right: 0;
  }
}
.tabBarBox {
  margin-top: 0.2rem;
}
.tabCar {
  margin-top: 0.1rem;
}
// 卡券
.cardList {
  margin: 0.1rem 0.2rem 0.3rem 0.2rem;
  box-sizing: border-box;

  .cardItem {
    background: #fff;
    border-radius: 10px;
    box-sizing: border-box;
    overflow: hidden;
    margin-bottom: 0.2rem;
    .box {
      overflow: hidden;
      .cardItem_lt {
        padding: 0.3rem 0.2rem;
        text-align: center;
        box-sizing: content-box;
        background: #ff58c2;
        color: #fff;
        overflow: hidden;
        height: 1.4rem;
        width: 30%;
        .price_icon {
          font-size: 0.3rem;
          color: #fff;
        }
        .price {
          color: #fff;

          .txt {
            font-size: 0.8rem;
            font-weight: bold;
          }
          .name {
            font-size: 0.28rem;
          }
        }
      }
      .cardItem_rt {
        padding: 0.3rem;
        border-bottom: 1px dashed #ccc;
        overflow: hidden;
        height: 1.4rem;
        width: 70%;
        .label_name {
          .label_txt {
            background: #ff3415;
            color: #fff;
            border-radius: 3px;
            text-align: center;
            padding: 0.07rem 0.2rem;
            font-size: 0.24rem;
            margin-right: 0.1rem;
          }
          .label_txt1 {
            color: #333;
            font-size: 0.28rem;
            font-weight: bold;
          }
        }
        .label_time {
          margin-top: 0.2rem;
          font-size: 0.26rem;
          color: #666;
        }
      }
    }
    .cardNo {
      padding: 0.2rem 0.3rem 0.2rem 0.2rem;
      font-size: 0.28rem;
      color: #333;
    }
  }
}

// 维修
.repairData {
  margin: 0.1rem 0.2rem 0.3rem 0.2rem;
  box-sizing: border-box;
  overflow: hidden;
  .repairItem {
    background: #fff;
    overflow: hidden;
    border-radius: 5px;
    padding: 0.2rem;
    margin-bottom: 0.2rem;
    .item_title {
      justify-content: space-between;
      padding: 0.1rem 0.1rem 0.2rem 0.3rem;
      border-bottom: 1px solid #f1f1f1;
      font-size: 0.28rem;
      margin-bottom: 0.3rem;
      position: relative;
      &::before {
        content: "";
        display: block;
        width: 3px;
        height: 15px;
        background: #409eff;
        position: absolute;
        left: 0;
        top: 5px;
      }
    }
    .item_content {
      padding: 0 0.3rem;
      .item_contentbox {
        justify-content: space-between;
      }
      .item_data {
        font-size: 0.28rem;
        margin-bottom: 0.2rem;
        display: flex;
        .item_data_label {
          color: #333;
        }
        .item_data_value {
          color: #262626;
          &.txt {
            line-height: 0.32rem;
          }
        }
      }
      .item_data_width {
        width: 4.5rem;
      }
    }
  }
}

// 联系人
.contactbox {
  margin: 0.1rem 0.2rem 0.3rem 0.2rem;
  .contactItem {
    justify-content: space-between;
    background: #fff;
    padding: 0.2rem;
    margin-bottom: 0.1rem;
    border-radius: 4px;
    .contact_lt {
      .header {
        margin-bottom: 0.2rem;
        color: #333;

        .txt {
          font-size: 0.2rem;
          margin-right: 0.2rem;
          background: #409eff;
          padding: 0.1rem 0.2rem;
          border-radius: 4px;
          color: #fff;
        }
        .name {
          font-size: 0.28rem;
        }
      }
      .tel {
        font-size: 0.3rem;
        color: #333;
      }
    }
    .contact_rt {
      .icon-wx {
        font-size: 0.7rem;
        color: #409eff;
      }
      .icon-tel {
        font-size: 0.36rem;
        background: #35bc04;
        color: #fff;
        text-align: center;
        padding: 0.1rem;
        border-radius: 50%;
        position: relative;
        top: -6px;
        margin-right: 0.1rem;
      }
    }
  }
}
.addBtn {
  position: fixed;
  bottom: 0.8rem;
  width: 100%;
  z-index: 1;
  .orderItem_filebox {
    width: 2.8rem;
    margin: auto;
    text-align: center;
    font-size: 0.28rem;
    background: #409eff;
    color: #fff;
    padding: 0.25rem 0rem;
    border-radius: 50px;
  }
}
.relationTitle {
  padding-left: 0.2rem;
  border-left: 4px solid #409eff;
  margin-left: 0.3rem;
  margin-top: 0.3rem;
}
.orderList {
  margin: 0.2rem;
  overflow: hidden;
  padding-bottom: 1.5rem;
  .orderItem {
    padding: 0.3rem;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 0.3rem;
    .orderItem_header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 0.3rem;
      padding-bottom: 0.2rem;
      border-bottom: 1px solid #f6f6f6;
      position: relative;
      .orderItem_lt {
        .carNo {
          font-size: 0.3rem;
          color: #333;
          margin-right: 0.2rem;
          font-weight: bold;
        }

        .carStatus {
          background: #35bc04;
          color: #fff;
          border-radius: 4px;
          padding: 0.1rem 0.2rem;
          font-size: 0.24rem;
          text-align: center;
          width: 1rem;
          margin-top: 0.1rem;
        }
      }
      .orderItem_rt {
        display: flex;
        align-items: center;
        align-self: center;
        justify-content: flex-start;
        color: #666;
        font-size: 0.28rem;

        .txt {
          font-size: 0.28rem;
          color: #161616;
        }
        .icon-tel {
          color: #fff;
          background: #35bc04;
          font-size: 0.32rem;
          padding: 0.1rem;
          border-radius: 50%;
          margin-right: 0.2rem;
        }
        .icon-wx {
          color: #409eff;
          font-size: 0.65rem;
        }
      }
    }
    .orderItem_content {
      display: flex;
      justify-content: flex-start;
      flex-wrap: wrap;
      align-items: center;
      .orderItem_data {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        width: 50%;
        margin-bottom: 0.2rem;
        font-size: 0.28rem;
        box-sizing: content-box;
        color: #333;
        .order_label {
          font-size: 0.28rem;
          color: #333;
          width: 1.8rem;
        }
        .txt {
          font-size: 0.28rem;
          color: #666;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        &.time {
          width: 100%;
        }
      }
    }
    .orderItem_file {
      background: #ebebeb;
      color: #333;
      border-radius: 5px;
      padding: 0.2rem 0;
      text-align: center;
      width: 100%;
      font-size: 0.28rem;
      display: flex;
      align-items: center;
      justify-content: center;
      .file_item {
        width: 33.33%;
        border-right: 1px solid #ccc;
        .icon-tel {
          font-size: 0.34rem;
          color: #35bc04;
          margin-right: 0.1rem;
        }
        .icon-mileage {
          font-size: 0.4rem;
          color: #409eff;
          margin-right: 0.1rem;
          position: relative;
          top: 0.04rem;
        }
        .icon-gw {
          font-size: 0.4rem;
          color: #409eff;
          margin-right: 0.1rem;
          position: relative;
          top: 0.04rem;
        }
        &:last-child {
          border: none;
        }
      }
    }
  }
}

// 跟进信息
.followInfo {
  padding: 0.2rem;
  background: #fff;
  .followInfo_item {
    margin-bottom: 0.2rem;
    position: relative;
    .followInfo_lt {
      width: 20%;
      .followInfo_time {
        font-size: 0.28rem;
        color: #666;
        position: absolute;
        top: 5px;
      }
      &::before {
        content: "";
        height: 130px;
        width: 1px;
        background: #ccc;
        position: absolute;
        top: 30px;
        left: 0.4rem;
      }
      .icon-circle {
        color: #ccc;
        z-index: 2;
        position: absolute;
        top: 40px;
        left: 0.22rem;
        background: #fff;
      }
    }
    .followInfo_rt {
      background: #f1f1f1;
      width: 80%;
      padding: 0.3rem 0 0.3rem 0.3rem;
      border-radius: 4px;

      .followInfo_num {
        font-size: 0.28rem;
        color: #333;
        margin-bottom: 0.1rem;
      }
      .followInfo_data {
        font-size: 0.26rem;
        color: #666;
        margin-bottom: 0.1rem;
        .followInfo_img {
          width: 0.8rem;
          height: 0.8rem;
          margin-right: 0.1rem;
        }
      }
    }
  }
}
</style>

